#include"performance_monitoring/GetBoxStatusFactory.h"
#include"performance_monitoring/functionMenu.h"
static std::shared_ptr<performance_monitoring::functionMenu> menuInstance=nullptr;
static std::once_flag menuFlag;

performance_monitoring::GetBoxStatusFactory::GetBoxStatusFactory() {
	std::cout << "__Performance Montioring Create__" << std::endl;
}

performance_monitoring::GetBoxStatusFactory::~GetBoxStatusFactory() {
	std::cout << "__Performance Montioring_Close__" << std::endl;
}
/**
 * Author: Hansan
 * 
 * 获取系统监控功能菜单实例.
 */
std::shared_ptr<performance_monitoring::functionMenu> performance_monitoring::GetBoxStatusFactory::getFunctionMenu(){
	std::call_once(menuFlag, [&]{
		menuInstance = std::shared_ptr<performance_monitoring::functionMenu>(new performance_monitoring::functionMenu());
		});
	return menuInstance;
}
